import 'dart:async';

import 'package:app/constant/color.dart';
import 'package:flutter/material.dart';

import 'login.page.dart';

class SplashPage extends StatelessWidget {
  const SplashPage({super.key});

  @override
  Widget build(BuildContext context) {
    Timer(
      const Duration(seconds: 3),
      () => {
        Navigator.of(context).push(MaterialPageRoute(
          builder: (context) => LoginPage(),
        ))
      },
    );

    return Scaffold(
      backgroundColor: ThemeColors.mainColor,
      body: SafeArea(
        child: Column(
          children: [
            Row(
              mainAxisAlignment: MainAxisAlignment.end,
              children: [
                Container(
                  padding: const EdgeInsets.all(6.0),
                  decoration: BoxDecoration(
                    borderRadius: BorderRadius.circular(50),
                    color: Colors.black12.withOpacity(0.2),
                  ),
                  child: const Text(
                    "3s",
                    style: TextStyle(
                      fontSize: 16,
                      color: Colors.white,
                    ),
                  ),
                )
              ],
            ),
            const Expanded(
              child: Center(
                child: Text(
                  "Logo",
                  style: TextStyle(
                    color: Colors.white,
                    fontWeight: FontWeight.bold,
                    fontSize: 30,
                  ),
                ),
              ),
            )
          ],
        ),
      ),
    );
  }
}
